home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v10n18.arc / LN1018.ARC / SYSMETS < prev    next >
Text File  |  1991-10-30  |  4KB  |  74 lines

  1. Declare Function GetSystemMetrics Lib "user"(nIndex As Integer) As Integer 
  2.  
  3. Sub MAIN 
  4. Dim SysMet$(36) : Dim M$(36)     ' zero-based, not one-based!  
  5. SysMet$(0) = "SM«MDNM»CXSCREEN" : M$(0) = "Width of screen" 
  6. SysMet$(1) = "SM«MDNM»CYSCREEN" : M$(1) = "Height of screen" 
  7. SysMet$(2) = "SM«MDNM»CXVSCROLL" 
  8.     M$(2) = "Width of arrow bitmap on vertical scroll bar" 
  9. SysMet$(3) = "SM«MDNM»CYHSCROLL" 
  10.     M$(3) = "Height of arrow bitmap on horizontal scroll bar" 
  11. SysMet$(4) = "SM«MDNM»CYCAPTION" : M$(4) = "Height of caption" 
  12. SysMet$(5) = "SM«MDNM»CXBORDER" : M$(5) = "Width of window frame that can't be sized" 
  13. SysMet$(6) = "SM«MDNM»CYBORDER" : M$(6) = "Height of window frame that can't be sized" 
  14. SysMet$(7) = "SM«MDNM»CXDLGFRAME" : M$(7) = "Width of dialog frame" 
  15. SysMet$(8) = "SM«MDNM»CYDLGFRAME" : M$(8) = "Height of dialog frame" 
  16. SysMet$(9) = "SM«MDNM»CYVTHUMB" : M$(9) = "Height of thumb box on vertical scroll bar" 
  17. SysMet$(10) = "SM«MDNM»CXHTHUMB" 
  18.     M$(10) = "Width of thumb box on horizontal scroll bar" 
  19. SysMet$(11) = "SM«MDNM»CXICON" : M$(11) = "Width of icon" 
  20. SysMet$(12) = "SM«MDNM»CYICON" : M$(12) = "Height of icon" 
  21. SysMet$(13) = "SM«MDNM»CXCURSOR" : M$(13) = "Width of cursor" 
  22. SysMet$(14) = "SM«MDNM»CYCURSOR" : M$(14) = "Height of cursor" 
  23. SysMet$(15) = "SM«MDNM»CYMENU" : M$(15) = "Height of single-line menu bar" 
  24. SysMet$(16) = "SM«MDNM»CXFULLSCREEN" 
  25.     M$(16) = "Width of client area for full-screen window" 
  26. SysMet$(17) = "SM«MDNM»CYFULLSCREEN" 
  27.     M$(17) = "Height of client area for full-screen window" 
  28. SysMet$(18) = "SM«MDNM»CYKANJIWINDOW" : M$(18) = "Height of Kanji window" 
  29. SysMet$(19) = "SM«MDNM»MOUSEPRESENT" : M$(19) = "Is there a mouse in the house?" 
  30. SysMet$(20) = "SM«MDNM»CYVSCROLL" 
  31.     M$(20) = "Height of arrow bitmap on vertical scroll bar" 
  32. SysMet$(21) = "SM«MDNM»CXHSCROLL" 
  33.     M$(21) = "Width of arrow bitmap on horizontal scroll bar" 
  34. SysMet$(22) = "SM«MDNM»DEBUG" : M$(22) = "Is Windows debugging version present?" 
  35. SysMet$(23) = "SM«MDNM»SWAPBUTTON" 
  36.     M$(23) = "Are left and right mouse buttons swapped?" 
  37. SysMet$(24) = "SM«MDNM»RESERVED1" : M$(24) = "Reserved" 
  38. SysMet$(25) = "SM«MDNM»RESERVED2" : M$(25) = "Reserved" 
  39. SysMet$(26) = "SM«MDNM»RESERVED3" : M$(26) = "Reserved" 
  40. SysMet$(27) = "SM«MDNM»RESERVED4" : M$(27) = "Reserved" 
  41. SysMet$(28) = "SM«MDNM»CXMIN" : M$(28) = "Minimum width of window" 
  42. SysMet$(29) = "SM«MDNM»CYMIN" : M$(29) = "Minimum height of window" 
  43. SysMet$(30) = "SM«MDNM»CXSIZE" : M$(30) = "Width of bitmaps in title bar" 
  44. SysMet$(31) = "SM«MDNM»CYSIZE" : M$(31) = "Height of bitmaps in title bar" 
  45. SysMet$(32) = "SM«MDNM»CXFRAME" : M$(32) = "Width of window frame that can be sized" 
  46. SysMet$(33) = "SM«MDNM»CYFRAME" : M$(33) = "Height of window frame that can be sized" 
  47. SysMet$(34) = "SM«MDNM»CXMINTRACK" : M$(34) = "Minimum tracking width of Window" 
  48. SysMet$(35) = "SM«MDNM»CYMINTRACK" : M$(35) = "Minimum tracking height of Window" 
  49. SysMet$(36) = "SM«MDNM»CMETRICS" : M$(36) = "Number of System Metrics" 
  50.  
  51. Begin Dialog UserDialog 390, 220 
  52.     ' the four numbers for each dialog control are, in order, the
  53.     ' (x,y) location of the control, from the upper-left corner of
  54.     ' the dialog, and the width and depth of the control itself.
  55.     ' All units are pixels (yuk!). The two numbers given in the
  56.     ' Begin Dialog statement above are the width and depth of the
  57.     ' dialog box itself; WinWord will take care of its location.
  58.     Text 20, 10, 310, 10, "System Metrics"   
  59.     ListBox 20, 30, 350, 160, M$(), .nIndex 
  60.     OKButton 110, 195, 55, 20 
  61.     CancelButton 180, 195, 55, 20 
  62. End Dialog 
  63. Dim SysMets As Dialog UserDialog 
  64. On Error Goto done  ' Cancel generates error  
  65.  
  66. While 1 
  67.     Dialog SysMets 
  68.     n = SysMets.nIndex 
  69.     MsgBox M$(n) + " = " + Str$(GetSystemMetrics(n)), SysMet$(n) 
  70. Wend 
  71.  
  72. done: 
  73. End Sub 
  74.